<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>JSP 内置对象</title>
	</head>
	<body>
		<h1>test2</h1>
		<%
			//request
			//request接收浏览器传来的参数
			String idStr = request.getParameter("id");
			int id = Integer.parseInt(idStr);
			id++;
			//将数据存入到request中
			request.setAttribute("id", id);
			//将请求转发给 test3.jsp,同时也要把request 和 response 传给 test3.jsp
			request.getRequestDispatcher("test3.jsp").forward(request, response);
		%>
	</body>
</html>